package com.qikux.service;

import com.qikux.entity.Resource;
import com.qikux.entity.User;
import com.qikux.entity.UserInfo;
import com.qikux.vo.Page;
import com.qikux.vo.ResultVo;

import java.util.List;
import java.util.Map;

public interface UserService {

    /**
     * 注册用户
     * @param user
     * @return
     */
    ResultVo<?> register(User user);

    ResultVo<User> saveUserInfo(UserInfo userInfo);

    ResultVo<User> activeAccount(long userId);

    ResultVo<User> login(String tel, String password, String linkUrl);

    ResultVo<String> updatePassWord(String oldPassWord, String newPassWord, String confirmPassWord);

    ResultVo<List<Map<String, Object>>> staticsScore(Long userId);

    ResultVo<Page<Map<String, Object>>> detailScore(Long userId,Page<Map<String,Object>> pageBean);

    ResultVo<String> updateNickNameByUserId(String nickName, Long id);

    ResultVo<String> updateSexByUserId(String sex, Long id);

    ResultVo<String> updatePhoto(UserInfo info);

    ResultVo<String> updateEmial(User user,String oldEmail, String newEmail);

    ResultVo<User> findPassWord(String tel, String email);

    void initePassword(Long id);

    int uploadStatusById(Long uid);
    /**
     * @description 查询用户收藏资源信息
     * @date 2022/9/26 22:56
     * @auther XuHuanDong
     */
    ResultVo<Page<Map<String, Object>>> findCollect(User user,Page<Map<String,Object>> pageBean);

    ResultVo<Page<Map<String, Object>>> findCol(Long userId ,Page<Map<String,Object>> pageBean);

    ResultVo<Page<Map<String, Object>>> detailAttention(Long userId, Page<Map<String, Object>> pageBean);

    ResultVo<List<Map<String, Object>>> fenNum(Long id);

    ResultVo<List<Map<String, Object>>> fenNum2(Long userId);


    ResultVo<?> addAttention(Long userId, Long uid);

    ResultVo<?> deleteAttention(Long userId, Long uid);

    ResultVo<Map<String,Object>> showAttention(Long userId, Long rId);
}
